<!DOCTYPE html>
<html>
<head>
	<title>Logo征集</title>
</head>
<link rel="stylesheet" href="__STATIC__/index/css/font.css">
<link rel="stylesheet" href="__STATIC__/index/layui/css/layui.css?t=1527238724161">
<link rel="stylesheet" href="__STATIC__/index/css/global.css" charset="utf-8">
<body>
<include file="public/header"/>
<div class="layui-container fly-marginTop">
    <div class="fly-panel" pad20 style="padding-top: 5px;">
        <div class="layui-form layui-form-pane">
            <div class="layui-tab layui-tab-brief" lay-filter="user">
                <ul class="layui-tab-title">
                    <li class="layui-this">Logo征集</li>
                </ul>
                <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
                    <div class="layui-tab-item layui-show">
                        <form action="" method="post">
                        	<div class="layui-row">
                        		<blockquote class="layui-elem-quote">引用区域的文字</blockquote>
								<div class="layui-upload layui-col-md3">
								  <button type="button" class="layui-btn" id="test1">上传图片</button>
								  <div class="layui-upload-list">
								    <img class="layui-upload-img" id="demo1" style="width: 90px;height: 90px;">
								    <p id="demoText"></p>
								  </div>
								</div>
								<div class="layui-upload layui-col-md3">
								  <button type="button" class="layui-btn" id="test1">上传图片</button>
								  <div class="layui-upload-list">
								    <img class="layui-upload-img" id="demo1" style="width: 90px;height: 90px;">
								    <p id="demoText"></p>
								  </div>
								</div>      
                        	</div>


                            <div class="layui-row layui-col-space15 layui-form-item">
                                <div class="layui-col-md12">
                                    <label for="L_title" class="layui-form-label">标题</label>
                                    <div class="layui-input-block">
                                        <input type="text" id="L_title" name="title" required lay-verify="required" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                            </div>
                          
                            <div class="layui-form-item layui-form-text">
                                <div class="layui-input-block">
                                    <textarea id="L_content" name="content" required lay-verify="required" placeholder="详细描述" class="layui-textarea fly-editor" style="height: 260px;"></textarea>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label for="L_vercode" class="layui-form-label">图形码</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="L_imagecode" name="imagecode" required lay-verify="required" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-form-mid" style="padding: 0!important;">
                                    <img src="/auth/imagecode?t=1536478588231" class="fly-imagecode">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <button class="layui-btn" lay-filter="*" lay-submit>立即发布</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<include file="public/footer"/>
<script>
layui.use(['layedit','upload'], function(){
  var $ = layui.jquery
  ,upload = layui.upload
  ,layedit = layui.layedit;

  //普通图片上传
  var uploadInst = upload.render({
    elem: '#test1'
    ,url: '/upload/'
    ,before: function(obj){
      //预读本地文件示例，不支持ie8
      obj.preview(function(index, file, result){
        $('#demo1').attr('src', result); //图片链接（base64）
      });
    }
    ,done: function(res){
      //如果上传失败
      if(res.code > 0){
        return layer.msg('上传失败');
      }
      //上传成功
    }
    ,error: function(){
      //演示失败状态，并实现重传
      var demoText = $('#demoText');
      demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
      demoText.find('.demo-reload').on('click', function(){
        uploadInst.upload();
      });
    }
  });

  layedit.build('L_content'); //建立编辑器
});
</script>
</body>
</html>